<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;
?>

<?php
include_once "function_dhcp_operate.php";
include_once "function_misc_net.php";

$in_array['Subnet']= ipv4network($_POST['subnet'], $_POST['mask']);
$in_array['Mask']= $_POST['mask'];
$in_array['AddrRangStart']= $_POST['addrstart'];
$in_array['AddrRangEnd']= $_POST['addrend'];

$in_array['DefaultTime']= ($_POST['dd'] * (60 * 60 * 24 )) + ($_POST['dh'] * (60 * 60 )) +  ( $_POST['dm'] * 60 );

$in_array['MaxTime']= $_POST['md'] * (60 * 60 * 24) + $_POST['mh'] * (60 * 60 ) + $_POST['mm'] * 60 ;

$in_array['GateWay']= $_POST['gw'];
$in_array['DNS1']= $_POST['dns1'];
$in_array['DNS2']= $_POST['dns2'];
$in_array['Domain']= $_POST['domain'];

AppendXmlDhcpAddrPool($in_array);
include "function_misc_log.php";
logger("Add", $in_array, "Dhcp_Pool");

include "function_web_misc.php";
PrintSuccessPageAndJump('dhp_server_manage.php');

//echo("<meta http-equiv='refresh'content=0;URL='dhp_server_manage.php'>");
?>
